package cn.qh.com.dto;

import java.util.Date;


import java.io.Serializable;

import cn.qh.com.annotationverification.AnnotationSort;
import cn.qh.com.annotationverification.group.AddGroup;
import cn.qh.com.annotationverification.group.UpdateGroup;
import lombok.*;

import java.util.Date;

import io.swagger.annotations.ApiModel;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.URL;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;

/**
 * (Brand)表实体类
 *
 * @author makejava
 * @since 2021-11-26 10:31:42
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel
@SuppressWarnings("serial")
public class BrandDTO implements Serializable {
    /**
     * 主键
     */
    @ApiModelProperty(name = "id", value =
            "主键", dataType = "java.lang.Integer")
    private Integer id;
    /**
     * 品牌名
     */
    @ApiModelProperty(name = "name", value =
            "品牌名", dataType = "java.lang.String")
    @NotBlank(message = "品牌名输入不能为空")
    @Length(min = 5, max = 50, message = "品牌名必须大于5位,小于50位")
    private String name;
    /**
     * 品牌logo
     */
    @ApiModelProperty(name = "logo", value =
            "品牌logo", dataType = "java.lang.String")
    @NotBlank(message = "品牌logo不能为空")
    @URL(message = "url路径必须正确！")
    private String logo;
    /**
     * 首字母
     */
    @ApiModelProperty(name = "letter", value =
            "首字母", dataType = "java.lang.String")
    private String letter;
    /**
     * 品牌的描述
     */
    @ApiModelProperty(name = "description", value =
            "品牌的描述", dataType = "java.lang.String")
    private String description;
    /**
     * 排序
     */
    @AnnotationSort(groups = {AddGroup.class, UpdateGroup.class})
    @ApiModelProperty(name = "sort", value =
            "排序", dataType = "java.lang.Integer")
    private Integer sort;
    /**
     * 版本
     */
    @ApiModelProperty(name = "version", value =
            "版本", dataType = "java.lang.Integer")
    private Integer version;
    /**逻辑删除*/
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(name = "createdTime", value =
            "创建时间", dataType = "java.util.Date")
    private Date createdTime;
    /**
     * 修改时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(name = "updatedTime", value =
            "修改时间", dataType = "java.util.Date")
    private Date updatedTime;
}

